var NewsCon = iClass.get("News");
module.exports = {
	prefix: "/news",
	get: {
		"/by_id/:news_id": function(argument) {
			var news_id = this.params.news_id;
			var news = NewsCon.get(news_id);
			if (!news) {
				Throw("找不到指定新闻");
			}
			this.body = ResponObj("json", news);
		},
		"/list": function() {
			var query = this.request.query;
			this.body = ResponObj("json", NewsCon.getList(query.num, query.paeg));
		}
	}
}